package 享元模式;

public class Memory {
    private int size;//内存大小
    private boolean isused;//是否被使用
    private String id;//内存Id

    public Memory(int size, boolean isused, String id) {
        this.size = size;
        this.isused = isused;
        this.id = id;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public boolean isIsused() {
        return isused;
    }

    public void setIsused(boolean isused) {
        this.isused = isused;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return "Memory{" +
                "size=" + size +
                ", isused=" + isused +
                ", id='" + id + '\'' +
                '}';
    }
}
